#ifndef EMBEDDING_H
#define EMBEDDING_H

#include <QVector>
#include <QString>
#include <QJsonObject>
#include <QNetworkAccessManager>
#include <QNetworkReply>

class Embedding {
public:
    Embedding();
    QVector<float> getEmbedding(const QString& sentence, 
                                const QString& embeddingAIUrl, 
                                const QString& embeddingAIKey, 
                                const QString& embeddingAIModel);

private:
    QNetworkAccessManager manager;
    QJsonObject sendRequest(const QString& sentence, 
                            const QString& embeddingAIUrl, 
                            const QString& embeddingAIKey, 
                            const QString& embeddingAIModel);
    QVector<float> parseResponse(const QJsonObject& response);
};

#endif // EMBEDDING_H
